package com.dtguai;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import tk.mybatis.spring.annotation.MapperScan;

import java.util.Date;

/**
 * @author: com/tellhow
 * @date：2018-09-29 03:46:03
 */
@Controller
@SpringBootApplication
@MapperScan(basePackages = {"com.dtguai.app.dao"})
public class Application implements CommandLineRunner {
    private Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        logger.info("-------------------服务启动完成!{}--------------------", new Date());
    }

    @GetMapping("/")
    String home() {
        return "redirect:/swagger-ui.html";
    }

}
